package com.example.windowdemo.window.command;

import com.example.windowdemo.callback.WindowCommand;
import com.example.windowdemo.window.Window;

/**
 * @author: njb
 * @date: 2023/8/3 11:39
 * @desc:
 */
public class ShowWindowCommand implements WindowCommand {
    private Window<?> window;

    public ShowWindowCommand(Window<?> window) {
        this.window = window;
    }

    @Override
    public void execute() {
        window.show();
    }

    @Override
    public void cancel() {
        window.hide();
    }
}
